<!--
*Author：DGZ
 *Contact：jiduxiong@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/apsproject/planning/Aps_SalesOrder.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/apsproject/planning/Aps_SalesOrder.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        name: "Aps_SalesOrder",
        setup() {
            const table = ref({
                key: "SalesOrderId",
                footer: "Foots",
                cnName: "销售订单",
                name: "planning/Aps_SalesOrder",
                newTabEdit: false,
                url: "/Aps_SalesOrder/",
                sortName: "SalesOrderId"
            });
            const editFormFields = ref({"OrderNo":"","MaterialId":"","OrderType":"","RequiredDate":"","OrderDate":"","CustomerId":"","CustomerOrderNo":"","OrderStatus":"","OrderProgress":"","ContractDate":"","ContractType":"","SaleManagerId":"","SaleManagerName":"","TotalQty":"","RemindQty":"","FeeType":"","TotalFee":"","RemindFee":"","Currency":"","OrderPriority":"","Enabled":"","Remarks":""});
            const editFormOptions = ref([[{"dataKey":"APS_OrderType","data":[],"title":"订单类型","field":"OrderType","type":"select"},
                               {"title":"订单号","field":"OrderNo"},
                               {"dataKey":"WMS_Material","data":[],"title":"产品","field":"MaterialId","type":"select"},
                               {"title":"要求交付日期","field":"RequiredDate","type":"date"}],
                              [{"title":"下单日期","field":"OrderDate","type":"date"},
                               {"dataKey":"BASE_Customer","data":[],"title":"客户","field":"CustomerId","type":"select"},
                               {"title":"客户订单号","field":"CustomerOrderNo"},
                               {"dataKey":"订单状态","data":[],"title":"订单状态","field":"OrderStatus","type":"number"}],
                              [{"title":"订单进度","field":"OrderProgress","type":"number"},
                               {"title":"合同日期","field":"ContractDate","type":"date"},
                               {"title":"合同类型","field":"ContractType","type":"number"},
                               {"title":"销售经理","field":"SaleManagerId","type":"number"}],
                              [{"title":"销售经理","field":"SaleManagerName"},
                               {"title":"数量总计","field":"TotalQty","type":"decimal"},
                               {"title":"余量","field":"RemindQty","type":"number"},
                               {"title":"费用类型","field":"FeeType","type":"number"}],
                              [{"title":"总金额","field":"TotalFee","type":"decimal"},
                               {"title":"余量金额","field":"RemindFee","type":"number"},
                               {"title":"币种","field":"Currency","type":"number"},
                               {"dataKey":"APS_OrderPriority","data":[],"title":"订单优先级","field":"OrderPriority","type":"select"}],
                              [{"title":"启用","field":"Enabled"}],
                              [{"title":"备注","field":"Remarks","colSize":12,"type":"textarea"}]]);
            const searchFormFields = ref({"OrderNo":"","MaterialId":"","OrderType":"","RequiredDate":"","CustomerId":"","OrderStatus":"","OrderPriority":""});
            const searchFormOptions = ref([[{"title":"订单号","field":"OrderNo","type":"like"},{"dataKey":"APS_OrderType","data":[],"title":"订单类型","field":"OrderType","type":"select"}],[{"dataKey":"WMS_Material","data":[],"title":"产品","field":"MaterialId","type":"select"},{"dataKey":"订单状态","data":[],"title":"订单状态","field":"OrderStatus","type":"select"}],[{"dataKey":"BASE_Customer","data":[],"title":"客户","field":"CustomerId","type":"select"},{"title":"要求交付日期","field":"RequiredDate"}],[{"dataKey":"APS_OrderPriority","data":[],"title":"订单优先级","field":"OrderPriority","type":"select"}]]);
            const columns = ref([{field:"SalesOrderId",title:"ID",type:"bigint",width:110,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"OrderNo",title:"订单号",type:"string",link:true,width:110,fixed:true,showOverflowTooltip:true,align:"left"},
                       {field:"MaterialId",title:"产品",type:"bigint",bind:{ key:"WMS_Material",data:[]},width:120,showOverflowTooltip:true,align:"left"},
                       {field:"OrderType",title:"订单类型",type:"string",bind:{ key:"APS_OrderType",data:[]},sort:true,width:110,fixed:true,showOverflowTooltip:true,align:"left"},
                       {field:"OrderDate",title:"下单日期",type:"datetime",sort:true,width:110,fixed:true,showOverflowTooltip:true,align:"left"},
                       {field:"RequiredDate",title:"要求交付日期",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"CustomerId",title:"客户",type:"bigint",bind:{ key:"BASE_Customer",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"CustomerOrderNo",title:"客户订单号",type:"string",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"OrderStatus",title:"订单状态",type:"int",bind:{ key:"订单状态",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"OrderProgress",title:"订单进度",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ContractDate",title:"合同日期",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ContractType",title:"合同类型",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"SaleManagerId",title:"销售经理",type:"bigint",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"SaleManagerName",title:"销售经理",type:"string",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"TotalQty",title:"数量总计",type:"decimal",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"RemindQty",title:"余量",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"FeeType",title:"费用类型",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"TotalFee",title:"总金额",type:"decimal",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"RemindFee",title:"余量金额",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Currency",title:"币种",type:"int",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"OrderPriority",title:"订单优先级",type:"int",bind:{ key:"APS_OrderPriority",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Enabled",title:"启用",type:"sbyte",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效",type:"int",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",width:150,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"创建用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Creator",title:"创建人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"修改用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyTime",title:"修改时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"}]);
            const detail = ref({columns:[]});
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
